var dt_nav_you = document.querySelector("#dt_nav_you");

var dt_nav_bottom = document.querySelector("#dt_nav_bottom");
// 第一行
dt_nav_you.addEventListener("mouseover",function () {
    console.log("谁在上面");
    dt_nav_bottom.style.display = "block";
})
dt_nav_bottom.addEventListener("mouseleave",function () {
    console.log("离开了");
    dt_nav_bottom.style.display = "none";
})

// 标题二维码
var dt_nav_yand = document.querySelector("#dt_nav_yand");

var dt_nav_yanz = document.querySelector("#dt_nav_yanz");
// 第一行
dt_nav_yand.addEventListener("mouseover",function () {
    console.log("谁在上面");
    dt_nav_yanz.style.display = "block";
})
dt_nav_yanz.addEventListener("mouseleave",function () {
    console.log("离开了");
    dt_nav_yanz.style.display = "none";
})


// //中间导航下引
var dt_nav_chen = document.querySelector("#dt_nav_chen");

var dt_nav_xiff = document.querySelector("#dt_nav_xiff");
// 第一行
dt_nav_chen.addEventListener("mouseover",function () {
    console.log("谁在上面");
    dt_nav_xiff.style.display = "block";
})
dt_nav_xiff.addEventListener("mouseleave",function () {
    console.log("离开了");
    dt_nav_xiff.style.display = "none";
})


// 导航js
var nav = document.querySelectorAll(".nav > li ");
for (var i = 0; i < nav.length; i++){
    nav[i].index  = i;
    nav[i].addEventListener('click',function () {
        for(var k = 0; k < nav.length; k++){
            nav[k].classList.remove('active');
        }
        this.classList.add('active');
        console.log(this.index);
    })
}

//中间轮播
var swiper = new Swiper('.swiper-container', {
    slidesPerView: 3,
    spaceBetween: 30,
    freeMode: true,
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
});